<?php
$session=new CHttpSession();
$session->open();
$i=$session['i'];
$p=Profiles::model()->findByPk($data->uid);
$u=Users::model()->findByPk($data->uid);
?>

<tr<?php echo $i%2==1 ? '': ' class="tr1"'; ?>>
    <td align="center" class="td1<?php echo $i%2==1 ? '': ' td2"'; ?>"><a href="/index.php?r=article/view&menu=0&id=<?php echo $data->aid;?>"><?php echo $data->title;?></a></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>><?php echo $data->users->p->nickname;?></td>
    <td align="center"<?php echo $i%2==1 ? '': ' class="td2"'; ?>>
        <a href="/index.php?r=manage/index&cate=<?php echo (isset($session['cid'])&&$session['cid']>0)  ? $session['cid'] : 12;?>&id=<?php echo $data->aid;?>">编辑</a>
        |
        <a href="/index.php?r=manage/delxscj&cid=<?php
        echo Yii::app()->request->getParam('cate', 0);?>&iid=<?php
        echo Yii::app()->request->getParam('iid', 0);?>&pid=<?php
        echo Yii::app()->request->getParam('pid', 0);?>&id=<?php echo $data->aid;?>">删除</a>
    </td>
</tr>

<?php
$session['i']=$i+1;
?>